//
//  UILabel + extension.swift
//  SinaWeibo25
//
//  Created by apple on 16/3/12.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

extension UILabel{
    
    class func labelWith(text: String, textColor: UIColor, fontsize: CGFloat, alignment: NSTextAlignment = .Center)-> UILabel {
        let l = UILabel()
        l.text = text
        l.textColor = UIColor.darkGrayColor()
        l.font = UIFont.systemFontOfSize(14)
        
     
        //设置居中
        l.textAlignment = alignment
        //设置自动换行
        l.numberOfLines = 0
        
        l.sizeToFit()
        
      return l
    }
}
